
<div class="container_12">
<?php
	
	//echo "lista de reservas desta escola";
?>
<table cellpadding="0" cellspacing="0" border="0" class="display" id="reservationTable">
	<thead>
		<tr>
			<th width="20%">Nome da oferta</th>
			<th width="15%">Nome do cliente</th>
			<th>email</th>
			<th width="15%">telefone</th>
			<th>data da reserva</th>
		</tr>
	</thead>
	<tbody>
		<td colspan="5" class="dataTables_empty">Loading data from server</td>	
	</tbody>
</table>
</div>
<script>
	
	ajaxUrl = "<?php echo $ajaxUrl;?>";
	
	$(document).ready(function() {
	
		var serverRequest = ajaxUrl + '/readReservationAction';
		
		var tableProperties = {		
			'sAjaxSource': 		serverRequest,	
			'sServerMethod':	'POST',
			'sAjaxDataProp': 	'data',
			"aoColumns": [
	  			{"mDataProp":"offerName"},
	  			{"mDataProp":"clientName"},
	  			{"mDataProp":"email"},
	  			{"mDataProp":"phone"},
	  			{"mDataProp":"date"}
			  ],
			'bJQueryUI':		true,	// enable jqueryUI Themes
			'bPaginate':		true,
			'bSort':			true,
			'bInfo':			true,
			'bAutoWidth':		true,
			'bProcessing': 		true,
			'bServerSide': 		false	// use server side processing
		};
		
		$('#reservationTable').dataTable(tableProperties);
		
	});


</script>